// $_FILEHEADER_BEGIN ***************************
// 版权声明:Timer
// Copyright © 2015 - Timer All Rights Reserved
// 文件名称: ITLoopView.h
// 创建日期: 15/7/27
// 创 建 人: 甄鑫
// 文件说明: 循环滚动视图 仅支持 一页一个显示一个子视图
// $_FILEHEADER_END ******************************


#import <UIKit/UIKit.h>
typedef enum : NSUInteger {
    TYPE_LOOP_VIEW_LEFT,
    TYPE_LOOP_VIEW_MIDDLE,
    TYPE_LOOP_VIEW_RIGHT,
} TYPE_LOOP_VIEW;
@protocol ITLoopViewDelegate <NSObject>

- (void)curSelectLeft:(UIView *)leftView
           middleView:(UIView *)middelView
            rightView:(UIView *)rightView
             loopType:(TYPE_LOOP_VIEW)loopType;

@end

@interface ITLoopView : UIView <UIScrollViewDelegate>
- (void)setLoopViewDelegate:(id)delegate;
- (void)startSetViewWithLeft:(UIView *)leftView
                  middleView:(UIView *)middelView
                   rightView:(UIView *)rightView;
- (void)startSetViewWithArr:(NSArray *)subViewArr;
- (NSArray *)getAllSubView;
- (void)setLoopViewHeight:(CGFloat)height;
- (void)activeToLeft;
- (void)activeToRight;

@end


@protocol ITLoopItemViewProtocol <NSObject>

- (void)setLoopItemViewWithData:(id)viewData;
- (id)getLoopItemViewData;
@end

@class ITLoopAutoCreateView;
typedef void(^LoopViewCB)(ITLoopAutoCreateView * curLoopView);

@interface ITLoopAutoCreateView : UIView

@property (nonatomic, copy)LoopViewCB curIndexCB;

- (void)setLoopViewFrame:(CGRect)loopViewFrame;
- (void)setLoopItemXibViewClass:(Class)pClass itemViewFrame:(CGRect)itemViewFrame;
- (void)setLoopItemViewClass:(Class)pClass itemViewFrame:(CGRect)itemViewFrame;
- (void)setLoopViewDataArr:(NSArray *)viewArr;
- (NSInteger)getCurIndex;
- (ITLoopView *)getLoopView;
- (void)setDefaultIndexWithIndex:(NSInteger)index;
@end


